package com.amos.muexamclient.sys.service.dto;


import com.alibaba.fastjson.JSONObject;
import com.amos.core.PageDTO;
import com.amos.muexamclient.sys.entity.SysOperLogEntity;
import com.amos.muexamcore.core.MuEntity;
import com.amos.muexamcore.core.MuField;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * Copyright © 2018 五月工作室. All rights reserved.
 *
 * @Package com.amos.muexamclient.service.dto
 * @ClassName SysOperLogDTO
 * @Description TODO
 * @Author Amos
 * @Modifier
 * @Date 2020-03-24 14:35:41
 * @Version 1.0
 **/
@MuEntity(table = "sys_oper_log", entity = SysOperLogEntity.class)
@Data
public class SysOperLogDTO extends PageDTO implements Serializable {

    private static final long serialVersionUID = -5609876029711703302L;
    @MuField(remark = "模块标题", type = "varchar", length = 50, column = "title")
    private String title;

    @MuField(remark = "业务类型（0其它 1新增 2修改 3删除）", type = "int", column = "business_type")
    private String businessType;

    @MuField(remark = "方法名称", type = "varchar", length = 100, column = "method")
    private String method;

    @MuField(remark = "请求方式", type = "varchar", length = 10, column = "request_method")
    private String requestMethod;

    @MuField(remark = "操作类别（0其它 1后台用户 2手机端用户）", type = "int", column = "operator_type")
    private String operatorType;

    @MuField(remark = "操作人员", type = "varchar", length = 50, column = "oper_name")
    private String operName;

    @MuField(remark = "部门名称", type = "varchar", length = 50, column = "dept_name")
    private String deptName;

    @MuField(remark = "请求URL", type = "varchar", length = 255, column = "oper_url")
    private String operUrl;

    @MuField(remark = "主机地址", type = "varchar", length = 50, column = "oper_ip")
    private String operIp;

    @MuField(remark = "操作地点", type = "varchar", length = 255, column = "oper_location")
    private String operLocation;

    @MuField(remark = "请求参数", type = "varchar", length = 2000, column = "oper_param")
    private String operParam;

    @MuField(remark = "返回参数", type = "varchar", length = 2000, column = "json_result")
    private String jsonResult;

    @MuField(remark = "操作状态（0正常 1异常）", type = "int", column = "status")
    private String status;

    @MuField(remark = "错误消息", type = "varchar", length = 2000, column = "error_msg")
    private String errorMsg;

    @MuField(remark = "操作时间", type = "datetime", column = "oper_time")
    private Date operTime;

    @Override
    public String toString() {
        return JSONObject.toJSONString(this);
    }
}
